package net.xdclass.enums;

import lombok.Getter;

/**
 * 小滴课堂,愿景：让技术不再难学
 *
 * @Description 状态码定义约束，共6位数，前三位代表服务，后3位代表接口
 *  比如 商品服务210,购物车是220、用户服务230，403代表权限
 *
 **/

public enum BizCodeEnum {


    /**
     * 文件相关
     */
    FILE_NOT_EXISTS(220404,"文件不存在"),
    FILE_RENAME_REPEAT(220405,"文件名重复"),
    FILE_DEL_BATCH_ILLEGAL(220406,"文件删除参数错误"),
    FILE_TYPE_ERROR(220407,"文件类型错误"),
    FILE_CHUNK_TASK_NOT_EXISTS(220408,"分片任务不存在"),
    FILE_CHUNK_NOT_ENOUGH(220409,"分片数量不匹配，合并不够"),
    FILE_STORAGE_NOT_ENOUGH(220410,"存储空间不足"),
    FILE_TARGET_PARENT_ILLEGAL(220411,"目标父级目录不合法"),
    SHARE_CANCEL_ILLEGAL(220412,"取消分享失败，参数不合法"),
    SHARE_CODE_ILLEGAL(220413,"分享码不合法"),
    SHARE_NOT_EXISTS(220414,"分享不存在"),
    SHARE_CANCEL(220415,"分享已取消"),
    SHARE_EXPIRED(220416,"分享已过期"),
    SHARE_FILE_ILLEGAL(220417,"分享的文件不合规"),

    /**
     * 账号
     */
    ACCOUNT_REPEAT(250001,"账号已经存在"),
    ACCOUNT_UNREGISTER(250002,"账号不存在"),
    ACCOUNT_PWD_ERROR(250003,"账号或者密码错误"),
    ACCOUNT_UNLOGIN(250004,"账号未登录");





    @Getter
    private String message;

    @Getter
    private int code;

    private BizCodeEnum(int code, String message){
        this.code = code;
        this.message = message;
    }
}